// dlg.txt

begintalkscript;

variables;

begintalknode 1;
	state = -1;
	nextstate = -1;
	condition = get_sdf(44,1) == 0;
	question = "special";
	text1 = "The road here curls around near where the northern mountain chain curves around to the south. Looking up at the rocky peaks, you can dimly see two passes up in the clouds. One to the north and one to the west.";
	text2 = "This is one of the patches of the Storm Plains that still has not been purged of wandering rogues. You can see their tracks in the damp soil. The forces of General Alwan must be occupied at the front to the east.";
	text3 = "From here, it is hard to see the western pass. The road up to the northern pass curls up above you. You think that you can see large, ominous shapes wandering in the mist.";
	action = SET_SDF 44 1 1;

begintalknode 2;
	state = -1;
	nextstate = -1;
	condition = get_sdf(44,2) == 0;
	question = "special";
	text1 = "You are at the base of the road up to the pass to the north. There are numerous creation tracks on the ground. However, the creatures that left them are far larger than the rogues down below.";
	text2 = "You see signs of frequent (and recent skirmishes) along this road. Some firepower has been brought to bear to dislodge the rogues ahead. So far, it hasn't worked.";
	action = SET_SDF 44 2 1;

begintalknode 3;
	state = -1;
	nextstate = -1;
	condition = get_sdf(44,3) == 0 && gf(100,16) == 0 && gf(44,11) == 0;
	question = "special";
	text1 = "You finally reach the massive granite gate blocking you from the Shaper Citadel. You approach it. It doesn't open. You touch it. You look for a door. You shout for someone to come see you. There is no reaction.";
	text2 = "Perhaps, if you had permission to get through, some way to pass would become apparent. As it is, you won't be able to get through.";
	action = SET_SDF 44 3 1;

begintalknode 4;
	state = -1;
	nextstate = -1;
	condition = get_sdf(44,5) == 0;
	question = "special";
	text1 = "You are at the low end of the valley that passes through the mountains to the west. There is a large gateway blocking the path. It is defended by a large chain of huge mines. They are some of the largest you have ever seen. Very dangerous.";
	text2 = "The way the mines have been placed is very interesting. It looks like they are positioned to keep people inside the Storm Plains, not out.";
	text3 = "General Alwan wants to make it clear that, no matter how bad things get in this province, there is no retreat. No escape. The only options are stopping the rebel advance or death.";
	action = SET_SDF 44 5 1;

begintalknode 5;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "This huge battle beta shifts nervously from one foot to the other when you get close. When you ask it something, it says, _No talk. Me beta. Beta no can talk._ Then it gives a little shrug.";



begintalknode 6;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The sign says:";
	text2 = "  GATE SEALED BY ORDER OF GENERAL ALWAN";
	text3 = "   BEWARE! MINES";

begintalknode 7;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "There are several lines of mines and triggers here, recently bred and waiting to be placed along the roads. Fortunately, they are not yet active.";

begintalknode 8;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The sign says:";
	text2 = "  TO CITADEL GATE. GATES ARE CLOSED WITHOUT COUNCIL PERMISSION.";
	text3 = "Someone has recently added below:";
	text4 = "  WARNING! DANGEROUS ROGUE INFESTATION! STAY AWAY!";

begintalknode 9;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The sign says:";
	text2 = "  Shaper Citadel - North";
	text3 = "  Perikalia - South";
	text4 = "  Northern Passes - Northeast";
	


begintalknode 10;
	state = -1;
	nextstate = 10;
	condition = 1;
	question = "Captain Milburn";
	text1 = "There is a small Shaper camp here. Two soldiers and a few creations watching the road. Considering the number of dormant mines you saw outside the clearing, they are probably here to maintain the defenses to the south.";
	text2 = "The captain warily walks forward to greet you. He says, _You don't look like bandits. And, if you are, you should know that it's suicide to ply your trade this close to Perikalia._";
	text3 = "_I'm Captain Milburn. You'd better be moving on. We don't like to be antisocial, but this is a private camp._";
	text5 = "Captain Milburn paces around, watching the road for rogues. He tries his best to ignore you. You clear your throat to get his attention. _What is it now? We aren't here to socialize._";
	action = INTRO;

begintalknode 11;
	state = 10;
	nextstate = 11;
	condition = 1;
	question = "Tell me about this area.";
	text1 = "_It's infested with rogues. We'll get reinforcements to clear it soon. In the meantime, stay on the roads and move on quickly._";

begintalknode 12;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "Where should I go?";
	text1 = "_The city of Perikalia is to the south. That's probably the best place to go._";

begintalknode 13;
	state = 10;
	nextstate = 12;
	condition = 1;
	question = "I'd like to know about the west pass.";
	text1 = "_It goes to Lethia Province. Don't try to get through. Nobody leaves the Storm Plains from this side. You'll just get killed. And you won't be the first._";

begintalknode 14;
	state = 12;
	nextstate = -1;
	condition = 1;
	question = "Why can't anyone leave the Storm Plains?";
	text1 = "_General Alwan's orders. All of the problems we've had have been because we showed the rebels our weakness. There is no more surrender, no more flight. We stop the rebels here._";
	text2 = "_That's one of the reasons Val and I are here. We maintain the mines at the gate._";

begintalknode 15;
	state = 12;
	nextstate = 13;
	condition = 1;
	question = "Can anyone come in through the gate?";
	text1 = "_Of course. When Lethia sends supplies and troops, they can open the gate and temporarily pass the mines. They then become active again, sealing the gate behind them._";

begintalknode 16;
	state = 13;
	nextstate = -1;
	condition = 1;
	question = "And what do they think of that?";
	text1 = "_They are thankful for the opportunity to face the enemy without the distraction of escape routes. A true loyalist could feel no different._";

begintalknode 17;
	state = 10;
	nextstate = 14;
	condition = 1;
	question = "Tell me about the north pass.";
	text1 = "_It leads up to the Shaper Citadel. Don't bother to go up there, not unless you have permission to see the Council, from the Council._";
	text2 = "_And, even if you do have permission, beware the rogues. A bunch of them have gotten stuck up there, and we haven't been able to dislodge them yet._";
	code =
		if (gf(44,6) > 0)
			rs(2);
	break;

begintalknode 18;
	state = 14;
	nextstate = -1;
	condition = gf(44,6) == 0;
	question = "You are tolerating rogues blocking the path to the Citadel?";
	text1 = "_Tolerate? Of course not! They are all doomed. But, since nobody is allowed to travel to and from the Citadel, it's not a high priority. The moment the Council wants to meet, though, they will be dead inside of a day._";

begintalknode 19;
	state = 10;
	nextstate = 15;
	condition = gf(100,16) > 0 && gf(44,6) == 0 && gf(44,7) == 0;
	question = "I have to get to the Shaper Council. I need you to help clear the way.";
	text1 = "The captain suddenly becomes very nervous. He looks at his handful of creations. Then he looks at you. _I'm sure you have a reason to be up there. I know that the Council has been meeting._";
	text2 = "_But I don't have the forces to do the job, and nobody has been sent to help me._";
	
begintalknode 20;
	state = 15;
	nextstate = 10;
	condition = get_stat(20) >= 12;
	question = "I am the help that was sent. No more is coming. I need to see the Council, and you will help me.";
	text1 = "You put all of your considerable authority into the words. Milburn shakes his head sadly. He sees that he has no choice.";
	text2 = "_All right. We all have to die sometime, I suppose. Valerie will need to stay here to watch the mines. The rest of us will accompany you. Give the word when you are ready._";
	code =
		sf(44,7,1);
		award_party_xp(150,20);
	break;
	
begintalknode 21;
	state = 15;
	nextstate = 10;
	condition = get_stat(20) < 12;
	question = "I still need your help.";
	text1 = "He shakes his head. _You're an outsider. I don't answer to you. Not without orders. If you are going to see the Council, and I have my doubts about that, you are on your own._";
	text2 = "_Anything else you want to know? Unless you're moving on, I mean._";

begintalknode 22;
	state = 10;
	nextstate = -1;
	condition = gf(44,6) == 0 && gf(44,7) > 0;
	question = "I'm ready. Begin the attack.";
	text1 = "Milburn barks out some commands to his creations. They quickly, unthinkingly line up behind him. _Now stay close to me. If you're really the help that was sent to us, well, we'll need it._";
	text2 = "They begin to climb up the hill.";
	action = END_TALK;
	code =
		sf(44,8,1);
	break;
	
begintalknode 23;
	state = 10;
	nextstate = -1;
	condition = gf(44,6) == 0 && gf(44,7) > 0;
	question = "I'm not ready to begin the attack.";
	text1 = "_I'm not sorry to hear it. Tell me when you are._";
	action = END_TALK;

begintalknode 24;
	state = 10;
	nextstate = -1;
	condition = gf(44,8) > 1;
	question = "Thank you for your help.";
	text1 = "He nods. _I am surprised to still be alive. I wish you luck dealing with the Council. I suspect that your troubles are only just beginning._";
	
//

begintalknode 30;
	state = -1;
	nextstate = 30;
	condition = 1;
	question = "Valerie";
	text1 = "This tall, thin woman is kneeling over a mine, pair of tongs held loosely in her hand. The fact that one wrong move would result in a quick, splattery death seems to be of no concern to her. She hums happily.";
	text2 = "Then your shadow falls over her, and she turns. _Careful, careful,_ she warns. _The mines like me. They trust me. You, not so much._";
	text3 = "_I'm Valerie._ She points at her shoulder. It's free of military insignia. _I'm a worker, not a soldier. What do you want?_";
	text5 = "Valerie watches you silently, always being sure to interpose herself between you and her precious mines.";
	action = INTRO;

begintalknode 31;
	state = 30;
	nextstate = 32;
	condition = gf(44,9) == 0;
	question = "You aren't a soldier?";
	text1 = "_Not officially. I'm an outsider civilian in their employ. I breed and place mines. I have a knack for it._ She lightly pats the mine with her hand. _They like me and trust me._";

begintalknode 32;
	state = 30;
	nextstate = 31;
	condition = gf(44,9) == 0;
	question = "Tell me about the mines.";
	text1 = "_They're living creatures, like you and me. They are born. They grow up. And then they die. The only difference, really, is that they explode and we don't._";
	text2 = "_They're a marvelous creation. I've always been fascinated by them._";

begintalknode 33;
	state = 30;
	nextstate = 34;
	condition = gf(44,9) == 0;
	question = "Do you place the mines around here?";
	text1 = "_I did. I go into Perikalia for mine creatures and shells, bring them out here, and place them. Smaller mines go along the roads. Larger ones by the gates._";

begintalknode 34;
	state = 31;
	nextstate = -1;
	condition = 1;
	question = "Do you breed them?";
	text1 = "_I used to, but others are better at that. Others breed the creatures. And different people make the shells they live in. I put the creatures in the shells, transport them, and place them._";

begintalknode 35;
	state = 31;
	nextstate = -1;
	condition = 1;
	question = "Why don't the Shapers create the mines?";
	text1 = "_Because so many places need mines and there are so few Shapers. So breeding the lesser creations, like living tools and mines and batons, that falls to outsiders._";

begintalknode 36;
	state = 31;
	nextstate = -1;
	condition = 1;
	question = "What happens to the mines if they never explode?";
	text1 = "_They grow old. They die. They are fragile creatures. They lose their explosive force after a year or two and die not long after._";
	text2 = "_Don't feel guilty. They aren't smart. They're like limpets. Except, you know, boom._";

begintalknode 37;
	state = 32;
	nextstate = -1;
	condition = 1;
	question = "And you aren't afraid of dying in an accident?";
	text1 = "_Afraid? No. But I am very, very careful. I don't fear these creatures, but I respect them._";

begintalknode 38;
	state = 34;
	nextstate = -1;
	condition = 1;
	question = "Can you help me pass the mines?";
	text1 = "_Of course. Once you show me a paper from Stormhold that says that I have to._ She watches you silently for a moment. _No? I thought not._";

begintalknode 39;
	state = 30;
	nextstate = -1;
	condition = gf(100,16) > 0 && gf(44,6) == 0 && gf(44,7) == 0 && gf(44,9) == 0;
	question = "I have to get to the Shaper Council. I need you to help clear the way.";
	text1 = "She shakes her head. _Do I look like a warrior? Talk to Captain Milburn. He's the stabber around here._";

begintalknode 40;
	state = 30;
	nextstate = 32;
	condition = gf(44,9) > 0;
	question = "Can I talk to you?";
	text1 = "_After you went and got Captain Milburn killed? Not likely. Please leave me alone. You are a dangerous person to know._";
	action = END_TALK;
	
//

begintalknode 50;
	state = -1;
	nextstate = 50;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode 51;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

	
begintalknode 52;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 53;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 54;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 55;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 56;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 57;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 58;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 59;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 60;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 61;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 62;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 63;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 64;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

//

begintalknode 70;
	state = -1;
	nextstate = 70;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode 71;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

//

begintalknode 90;
	state = -1;
	nextstate = 90;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode 91;
	state = 90;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
		